package com.wy2cloud.job.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import com.wy2cloud.job.quartzext.AddJob;

@RestController
public class HomeController {
	
	@Autowired
	private AddJob addJob;

	@RequestMapping(value="/",method=RequestMethod.GET)
	public String index() {
		try {
			addJob.execute();
		} catch (Exception e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		return "wy-job";
	}
}
